home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 May: Tool Chest / Dev.CD May 97 TC.toast / Sample Code / Snippets / Interapplication Communication / SuspendAppleEvent / SuspendEvent.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-10  |  2.0 KB  |  62 lines  |  [TEXT/MPS ]

  1. #include <Types.h>
  2. #include <memory.h>
  3. #include <Packages.h>
  4. #include <Errors.h>
  5. #include <quickdraw.h>
  6. #include <fonts.h>
  7. #include <dialogs.h>
  8. #include <windows.h>
  9. #include <menus.h>
  10. #include <events.h>
  11. #include <OSEvents.h>
  12. #include <Desk.h>
  13. #include <diskinit.h>
  14. #include <OSUtils.h>
  15. #include <resources.h>
  16. #include <toolutils.h>
  17. #include <AppleEvents.h>
  18. #include <EPPC.h>
  19. #include <GestaltEqu.h>
  20. #include <PPCToolbox.h> 
  21. #include <Processes.h>
  22. #include <Balloons.h>
  23. #include <aliases.h>
  24.  
  25. /* windowControl is the structure attached to every window I create (in the refCon */
  26. /* field) that contains all the information I need to know about the window. */
  27. /* data, procedure pointers for controlling, and anything else gets put in this */
  28. /* struct.  That makes my windows autonomous */
  29. struct windowControl {
  30.     unsigned long windowID;                                 /* master ID number  */
  31.     ProcPtr drawMe;                                         /* content drawing procedure pointer */
  32.     ProcPtr clickMe;                                        /* content click routine */
  33.     ProcPtr closeMe;                                        /* document close procedure pointer */
  34.     ProcPtr sizeMe;                                            /* size procedure */
  35.     AliasHandle fileAliasHandle;                            /* alias for this document */
  36.     Boolean windowDirty;
  37.     Handle generalData;                                        /* cast to whatever you need as you need it */
  38. };
  39. typedef struct windowControl windowControl, *windowCPtr, **windowCHandle;
  40.  
  41. enum {kDocWindowResID = 128,kMyDocumentWindow = 1000};
  42. /* menu enums */
  43. enum {kMBarID = 128};
  44. enum {kAppleMenu = 128,kFileMenu,kEditMenu,kToolsMenu};
  45.  
  46. /* file menu enums */
  47. enum {kNewItem = 1,kOpenItem,kCloseItem,kSaveItem,kSaveAsItem,kFileBlank1,kPageSetupItem,kPrintItem,kFileBlank2,kQuitItem};
  48.  
  49. /* general purpose enums */
  50. enum {kResumeMask=1,kSampHelp=129,kAboutBox=128,kHelpString=128,kBadSystem=130};
  51.  
  52. enum {kMinHeight = 200};
  53.  
  54. enum {kGeneralStrings=128};
  55. enum {kPendingWords1=1,kPendingWords2};
  56.  
  57.  
  58.  
  59. #define kSuspCreator 0x11171915
  60.  
  61. #define kFredDocType 'FRED'
  62. #define kAlDocType 'AL  '